local wezterm = require("wezterm")
local platform = require("utils.platform")()
local module = {}

function module.apply(config)
  if platform.is_linux then
    -- Spawn a fish shell in login mode
    config.default_prog = { "fish", "-l" }

    -- Launch Menu
    config.launch_menu = {
      {
        label = "北太天元",
        args = { "baltamaticaC.sh" },
        cwd = wezterm.home_dir .. "/Documents/baltamatica",
      },
      {
        label = "NeoVim Config",
        cwd = wezterm.home_dir .. "/.config/nvim"
      },
    }
  elseif platform.is_win then
    -- Spawn PowerShell On Windows Systems
    config.default_prog = {
      "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
    }

    -- https://wezterm.org/config/lua/config/default_domain.html
    -- WezTerm launches directly into a Linux shell
    -- rather than having to manually invoke `wsl.exe`
    -- config.default_domain = ""

    -- Launch Menu
    config.launch_menu = {
      {
        label = "北太天元",
        args = { "D:\\baltamatica\\lib\\baltamaticaCLI.exe" },
        cwd = "E:\\Documents\\baltamatica",
      },
      {
        label = "NeoVim Config",
        cwd = wezterm.home_dir .. "/AppData/Local/nvim"
      },
    }
  end

  -- Launch Menu for WezTerm config directory
  table.insert(config.launch_menu, {
    label = "WezTerm Config",
    cwd = wezterm.home_dir .. "/.config/wezterm",
  })
end

return module

